<?php
/**
 * 厅用户联系表
 * panglishan
 * 2020.07.31
 */
namespace App\Models\SociatyDB;

use Illuminate\Database\Eloquent\Model;

class SociatyUser extends Model{

    protected $connection = 'mysql_sociaty';

    protected $table = 'sc_sociaty_user';

    protected $primaryKey = 'id';

    protected $fillable = [
        'id',   //主键编号
        'sociaty_id', //厅编号
        'user_id',  //用户编号
        'add_time',   //记录添加时间(准确的流水统计时间)
    ];

    public $timestamps = false;

    // 关联工会
    public function sociaty()
    {
        return $this->hasOne("App\Models\SociatyDB\Sociaty", "id", "sociaty_id");
    }

}